home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / server1.zip / _MESSAGE.QC < prev    next >
Text File  |  1996-08-30  |  2KB  |  91 lines

  1. /*
  2. **
  3. ** _message.qc (Messages Code, 1.1)
  4. **
  5. ** Copyright (C) 1996 Johannes Plass
  6. ** 
  7. ** This program is free software; you can redistribute it and/or modify
  8. ** it under the terms of the GNU General Public License as published by
  9. ** the Free Software Foundation; either version 2 of the License, or
  10. ** (at your option) any later version.
  11. ** 
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ** 
  21. ** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
  22. **
  23. */
  24.  
  25.  
  26. void(entity player) MessagesInit =
  27. {
  28.    if (!USE_MODULE_MESSAGES) return;
  29. };
  30.  
  31. void(entity player) MessagesInfo =
  32. {
  33.    local float n;
  34.  
  35.    if (!USE_MODULE_MESSAGES) return;
  36.  
  37.    if (messages_flag ==
  38.        (MESSAGES_AMMO   | MESSAGES_ARMOR   | MESSAGES_BACKPACK | MESSAGES_KEY |
  39.         MESSAGES_HEALTH | MESSAGES_POWERUP | MESSAGES_WEAPON)) {
  40.        return;
  41.    }
  42.  
  43.    sprint(player,"# Messages: No pickup messages for\n");
  44.    sprint(player,"  ");
  45.  
  46.    n = 0;
  47.    if (!(messages_flag & MESSAGES_AMMO)) {
  48.       n = n + 1;
  49.       sprint(player,"ammo");
  50.    }
  51.    if (!(messages_flag & MESSAGES_ARMOR)) {
  52.       if (n) sprint(player,", ");
  53.       n = n + 1;
  54.       sprint(player,"armor");
  55.    }
  56.    if (!(messages_flag & MESSAGES_BACKPACK)) {
  57.       if (n) sprint(player,", ");
  58.       n = n + 1;
  59.       sprint(player,"backpacks");
  60.    }
  61.    if (!(messages_flag &  MESSAGES_KEY)) {
  62.       if (n) sprint(player,", ");
  63.       n = n + 1;
  64.       sprint(player,"keys");
  65.    }
  66.    if (!(messages_flag & MESSAGES_HEALTH)) {
  67.       if (n) sprint(player,", ");
  68.       n = n + 1;
  69.       if (n>4) { sprint(player,"\n  "); n = 1; }
  70.       sprint(player,"health");
  71.    }
  72.    if (!(messages_flag & MESSAGES_POWERUP)) {
  73.       if (n) sprint(player,", ");
  74.       n = n + 1;
  75.       if (n>4) { sprint(player,"\n  "); n = 1; }
  76.       sprint(player,"powerups");
  77.    }
  78.    if (!(messages_flag & MESSAGES_WEAPON)) {
  79.       if (n) sprint(player,", ");
  80.       n = n + 1;
  81.       if (n>4) { sprint(player,"\n  "); n = 1; }
  82.       sprint(player,"weapons");
  83.    }
  84.    if (n) sprint(player,".\n");
  85. };
  86.  
  87.  
  88.  
  89.  
  90.  
  91.